###################################################
# Makefile
#
#  Created on: 2010-5-14 10:23:56
#  Author: Hu.Liu
#
###################################################
PREDIFINES = -DLINUX -DNULL=0 -DSOCKET_ERROR=-1 -DINVALID_SOCKET=-1

CXXFLAGS = -O2 -g -Wall -fmessage-length=0 $(PREDIFINES) -I ./ 

SOURCES = $(wildcard ./*.cpp ./*/*.cpp ../src/*/*.cpp ../src/*/*/*.cpp ./*.c ./*/*.c ../src/*/*.c ../src/*/*/*.c)

OBJS := $(patsubst %.c,%.o, $(patsubst %.cpp,%.o, $(SOURCES)))

LIBS = -L/usr/local/lib/mysql

TARGET =  ./bin/gameserver


all:$(TARGET)
	
$(TARGET): $(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) -lrt 

clean:
	rm -f $(OBJS) $(TARGET)
